<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// [ 应用入口文件 ]

if(file_exists("./install") && !file_exists("./install/install.lock")){
    // 组装安装url
    $url=$_SERVER['HTTP_HOST'].trim($_SERVER['SCRIPT_NAME'],'index.php').'install/index.php';
    // 使用http://域名方式访问；避免 /install/index.php 路径方式的兼容性和其他出错问题
    header("Location:http://$url");
    die;
}

///定义配置目录
define('CONF_PATH', __DIR__.'/../config/');
// 定义应用目录
define('APP_PATH', __DIR__ . '/../application/');
// 定义上传目录
define('UPLOAD_PATH',__DIR__ . '/uploads/');
///后台分页显示条数
define('ADMIN_PAGE_LIMIT',8);
///后台路由前缀
define('ADMIN_ROUT_PREFIX','admin');


// 加载框架引导文件
require __DIR__ . '/../thinkphp/start.php';
